package summer_vacation.yangyiqing.m201508;

import java.util.Scanner;

/**
 * Created by Administrator on 2015/8/17 0017.
 */
public class Java_2 {
    public static void main(String[] args){
        Scanner n=new Scanner(System.in);
        int[] nums=new int[10];
        for(int i=0 ; i<10;i++){
            System.out.println("请输入第"+(i+1)+"个数字");
            nums[i]=n.nextInt();
        }
        int min = nums[0];
        int max = nums[0];
        for(int i=1 ; i< 10 ;i++){
            if(min > nums[i])
                min=nums[i];
            if(max < nums[i])
                max=nums[i];
        }
        System.out.println("您输入的最大数为:"+max);
        System.out.println("您输入的最小数为:"+min);
    }
}
